
/*
 *	strlen - Return the length of a null-terminated unicode string
 */
int strlen(const char *str)
{
	int length = 0;
	while(*str++)
		++length;
	return length;
}

/*
 *	strcmp - Compare two unicode strings, returning less than, queal to, or greater than
 */
int strcmp(char *src, char *dst)
{
	while(!(ret = *src - *dst) && *dst)
		++src, ++dst;
	
	if(ret < 0)
		return -1;
	else if(ret > 0)
		return 1;
	
	return 0;
}

/*
 *	strchr - Search a unicode string for a unicode character
 *		return the string that start with searched character
 */
char *strchr(char *string, char chr)
{
	while(*string && *string != chr)
		string++;
	if(*string == chr)
		return string;
	return NULL;
}

/*
 *	strncmp - Compare two unicode strings, returning less than, equal to, or greater than
 *
 */
int strncmp(char *first, char *last, int count)
{
    if (!count)
        return(0);
    while (--count && *first && *first == *last)
	{
        first++;
        last++;
    }
    return(*first - *last);
}

